
<template>
  <div class="body">
    <div class="m1" v-if="flag">
      <div class="iconfont icon-denglu"></div>
      <span>{{ username }}</span>
    </div>

    <div class="m1" v-else>
      <div class="iconfont icon-denglu"></div>
      <span>未登录</span>
    </div>

    <div class="m2" @click="jianli">
      <div class="iconfont icon-wodejianli"></div>
      <span>个人简历</span>
      <div class="iconfont icon-you"></div>
    </div>

    <div class="m3">
      <div class="iconfont icon-chanpin"></div>
      <span>关于产品</span>
      <div class="iconfont icon-you"></div>
    </div>

    <div class="m4" v-if="flag">
      <div class="iconfont icon-zhuxiao"></div>
      <span>注销登录</span>
      <div class="iconfont icon-you"></div>
    </div>

    <div class="m4" v-else>
      <div class="iconfont icon-zhuxiao"></div>
      <span>登录</span>
      <div class="iconfont icon-you"></div>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "My",
  data() {
    return {
      flag: "",
      username: "",
      value: "",
    };
  },

  methods: {
    jianli:function(){
      console.log("jianli");
      console.log(this);
      this.$router.push('/my/jianli');
    }
  },
};
</script>

<style lang="scss" scoped>
.m1 {
  text-align: center;
  background-color: #fff;
  border-bottom: 2px solid #ccc;
  padding-bottom: 20px;
  width: 100%;
  div {
    width: 200rpx;
    height: 110rpx;
    /* background-color: #E88807; */
    /* border-radius: 60rpx; */
    margin: 25px auto;
    line-height: 120rpx;
    color: #6D6D72;
    font-size: 100px;
  }
  span {
    font-size: 20px;
    color: #ccc;
  }
}

.m2,
.m3,
.m4 {
  display: flex; //在一行显示
  margin: 2px auto;
  background-color: #fff;
  padding: 10px 0px 10px 0px;
  border-bottom: 2px solid #ccc;
  div:nth-child(1) {
    font-size: 25px;
    margin: auto 5px;
  }
  span {
    font-size: 20px;
    color: #6D6D72;
  }
  div:nth-child(3) {
    color: #8F8F94;
    position: absolute;
    font-size: 25px;
    right: 5px;
    margin: auto 5px;
  }
}
</style>